<?php
	$mode=$_GET['mode'];
	$obj=new User();
	$obj->UserID=$_POST['UserID'];
	$obj->UserName=$_POST['UserName'];
	$obj->Pass=$_POST['Pass'];
	$obj->UserTypeID=$_POST['UserTypeID'];
	
	if($mode=="add" && $_POST['UserID']!="")
	{
		$obj->insert($conn);
	}
	if($mode=="update")
	{
		$obj->update($conn);
	}
	if($mode=="del")
	{
		$obj->UserID=$id;
		$obj->delete($conn);
	}
	$url="?module=$module";
	echo "<script language='JavaScript'> window.location = '".$url."'</script>";
?>